
<!-- Table 'readit_urls' edit -->
<form action="?" method="post" enctype="multipart/form-data" name="frmEdit" class="form-horizontal">
[#if OK#]
<div class="alert alert-success">Data has been saved</div>
[#endif OK#]
[#if ERR#]
<div class="alert alert-error">Please fill out all required fields</div>
[#endif ERR#]
<fieldset>
[#if ID=""#]
<legend>New Record</legend>
[#endif ID#]
<!-- URL (url) -->
<div class="control-group">
 <label class="control-label"[#if ERR_URL#] style="color:red;font-weight:bold"[#endif#]>
 URL:
 </label>
 <div class="controls">
  <input type="text" name="url" value="[#URL#][#if URL=""#]http://[#endif#]" class="input">
 </div>
</div>
<!-- TITLE (varchar) -->
<div class="control-group">
 <label class="control-label"[#if ERR_TITLE#] style="color:red;font-weight:bold"[#endif#]>
 TITLE:
 (*)
 </label>
 <div class="controls"><input type="text" name="title" value="[#TITLE#]" class="input"></div>
</div>
<!-- FAVORITE (int) -->
<div class="control-group">
 <label class="control-label"[#if ERR_FAVORITE#] style="color:red;font-weight:bold"[#endif#]>
 FAVORITE:
 </label>
 <div class="controls"><input type="text" name="favorite" value="[#FAVORITE#]" class="input"></div>
</div>
<!-- ADDED (datetime) -->
<div class="control-group">
 <label class="control-label"[#if ERR_ADDED#] style="color:red;font-weight:bold"[#endif#]>
 ADDED:
 </label>
 <div class="controls">
 <input type="text" name="added_date" value="[#ADDED_DATE#]" maxlength=10 size=12 class="input-small">
 [#module name="dateselect" field="added_date" form="frmEdit"#]
 &nbsp;&nbsp;&nbsp;
 <select name="added_hours" class="input-mini">
 [#begin ADDED_HOURS#]
 <option[#if SELECTED#] selected[#endif SELECTED#]>[#TITLE#]
 [#end ADDED_HOURS#]
 </select>
 :
 <select name="added_minutes" class="input-mini">
 [#begin ADDED_MINUTES#]
 <option[#if SELECTED#] selected[#endif SELECTED#]>[#TITLE#]
 [#end ADDED_MINUTES#]
 </select>
 </div>
</div>
<!-- SYS_ID (varchar) -->
[#if !IS_SET_SYS_ID#]
<div class="control-group">
 <label class="control-label"[#if ERR_SYS_ID#] style="color:red;font-weight:bold"[#endif#]>
 SYS_ID:
 </label>
 <div class="controls"><input type="text" name="sys_id" value="[#SYS_ID#]" class="input"></div>
</div>
[#endif IS_SET_SYS_ID#]
<!-- CHANNEL_ID (select) -->
[#if !IS_SET_CHANNEL_ID#]
<div class="control-group">
 <label class="control-label"[#if ERR_CHANNEL_ID#] style="color:red;font-weight:bold"[#endif#]>
 CHANNEL_ID:
 </label>
<div class="controls">
 <select name="channel_id" class="input">
  <option value="">select
  [#begin CHANNEL_ID_OPTIONS#]<option value="[#ID#]"[#if SELECTED#] selected[#endif#]>[#TITLE#]
  [#end CHANNEL_ID_OPTIONS#]
 </select>
</div>
</div>
[#endif IS_SET_CHANNEL_ID#]
<div class="form-actions">
 [#if ID!=""#]
 <button type="submit" name="subm" value="Submit" class="btn btn-primary">Submit</button>
 [#else ID#]
 <button type="submit" name="subm" value="Add" class="btn btn-primary">Add</button>
 [#endif ID#]
 <a href="?data_source=<#DATA_SOURCE#>" class="btn">Cancel</a>
<input type="hidden" name="id" value="<#ID#>">
<input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
<input type="hidden" name="edit_mode" value="<#EDIT_MODE#>">
<input type="hidden" name="mode" value="update">
<input type="hidden" name="data_source" value="<#DATA_SOURCE#>">
</div>
</fieldset>
</form>
